/**
* @author als31@aber.ac.uk
*/


#ifndef VIEWPANEL_H
#define VIEWPANEL_H

#include <QGLWidget>
#include "capturedevice.h"


enum View{
    COLOR,
    DEPTH,
    _3D,
    NOT_SET=-1
};

class ViewPanel : public QGLWidget
{
    Q_OBJECT

    QImage* _currentImage;
    View _viewType;

    void convertToQImage(const void* data, int  height, int width, StreamSource source);

public:
    explicit ViewPanel(QWidget *parent, View viewType = NOT_SET);

protected:
    void paintEvent(QPaintEvent*);
    void mousePressEvent(QMouseEvent *);
    
signals:
    void selected(View);
    
public slots:
    void updateImage(const void*, int, int, StreamSource);
    
};

#endif // VIEWPANEL_H
